import { NgModule } from "@angular/core";
import { RouterModule } from "@angular/router";
import { Route } from "@angular/router";

import { MaintaskComponent } from "./maintasks/maintask.component";
import { SidetaskComponent } from "./sidetasks/sidetask.component";
import { DeliveryTasksComponent } from "./batch-tasks/delivery-tasks.component";
import { MonthsComponent } from "./month/month.component";
import { DistributionComponent } from "./distribution/distribution.component";
import { ReadyComponent } from "./ready/ready.component";
import { ToolingreadyComponent } from "./ready/toolingready.component";
import { MaterialreadyComponent } from "./ready/materialready.component";
import { DistributionuserComponent } from "./distribution/distributionuser.component";
import { DistributiongangComponent } from "./distribution/distributiongang.component";
import { OutplanComponent } from "./outplan/outplan.component";
//import { MonthsComponent } from "./month/month.component";

@NgModule({
  imports: [
    RouterModule.forChild([
      {
        path: "",
        children: [
          {
            path: "model",
            component: MaintaskComponent,
            data: { permission: "Pages.Maintasks" },
          },
          {
            path: "sidetask",
            component: SidetaskComponent,
            data: { permission: "Pages.Sidetasks" },
          },
          {
            path: "delivery",
            component: DeliveryTasksComponent,
            data: { permission: "Pages.Delivery" },
          },
          {
            path: "month",
            component: MonthsComponent,
            data: { permission: "Pages.Plan.Month" },
          },
          {
            path: "ready",
            component: ReadyComponent,
            data: { permission: "Pages.Readytasks" },
          },
          {
            path: "toolready",
            component: ToolingreadyComponent,
            data: { permission: "Pages.Readytooltasks" },
          },
          {
            path: "materialsready",
            component: MaterialreadyComponent,
            data: { permission: "Pages.Readymaterialtasks" },
          },
          {
            path: "distribution",
            component: DistributionComponent,
            data: { permission: "Pages.Distribution" },
          },
          {
            path: "distributionuser",
            component: DistributionuserComponent,
            data: { permission: "Pages.Distributionuser" },
          },
          {
            path: "distributiongang",
            component: DistributiongangComponent,
            data: { permission: "Pages.Distributiongang" },
          },
          {
            path: 'outplan',
            component: OutplanComponent,
            data: { permission: 'Pages.OutPlan' },
        },
        ],
      },
    ]),
  ],
  exports: [RouterModule],
})
export class PlanRoutingModule {}
